package demo1;

import java.util.Comparator;

public class SalaryComparator implements Comparator<Staff> {

    @Override
    public int compare(Staff o1, Staff o2) {
        return (int)(o1.salary - o2.salary);
    }
}
